package org.linlinjava.litemall.wx.service;

import org.linlinjava.litemall.core.util.ResponseUtil;
import org.linlinjava.litemall.db.dao.LitemallMemberRuleMapper;
import org.linlinjava.litemall.db.domain.LitemallMemberRuleExample;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author Administrator
 */
@Service
public class WxMemberRuleService {
    @Autowired
    private LitemallMemberRuleMapper memberRuleMapper;

    /**
     * 查询租书规则列表
     * @return
     */
    public Object listMemberRules() {
        LitemallMemberRuleExample memberRuleExample = new LitemallMemberRuleExample();
        LitemallMemberRuleExample.Criteria criteria = memberRuleExample.createCriteria();
        criteria.andIsShowEqualTo();
        return ResponseUtil.okList(memberRuleMapper.selectByExample(memberRuleExample));
    }
}
